package com.eastedu.report.controller;

import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * The type Index controller.
 *
 * @author ZhenZhong
 */
@Controller
@Hidden
public class IndexController {

    /**
     * Template string.
     *
     * @return the string
     */
    @GetMapping("/templates")
    public String template() {
        return "template";
    }

    /**
     * Template admin string.
     *
     * @param model the model
     * @return the string
     */
    @GetMapping("/templates/admin")
    public String templateAdmin(Model model) {
        model.addAttribute("admin", true);
        return "template";
    }
}
